SERVER=xenon.cs.luc.edu:~/public_html/cs271/lectures

all: images slides article

article:
	pdflatex graphs.article
	bibtex graphs.article
	pdflatex graphs.article
	pdflatex graphs.article

slides:
	pdflatex graphs.beamer
	#bibtex graphs.beamer
	#pdflatex graphs.beamer
	pdflatex graphs.beamer

images:
	wget http://upload.wikimedia.org/wikipedia/commons/5/5d/Konigsberg_bridges.png
	wget http://farm1.static.flickr.com/127/408898897_c2bc6fb410_b.jpg -O Konigsberg.jpg
	wget http://upload.wikimedia.org/wikipedia/commons/c/ca/Salesman.PNG -O Salesman.png
	dot -Tpdf art_museum.dot > art_museum.pdf
	dot -Tpdf jobmatch_bad.dot > jobmatch_bad.pdf
	dot -Tpdf jobmatch_good.dot > jobmatch_good.pdf
	dot -Tpdf rail_map.dot > rail_map.pdf
	dot -Tpdf rail_map2.dot > rail_map2.pdf


publish: all
	scp graphs.beamer.pdf ${SERVER}/lec11-graphs.beamer.pdf
	scp graphs.article.pdf ${SERVER}/lec11-graphs.article.pdf

clean:
	-rm Konigsberg_bridges.*
	-rm *.aux *.log *.nav *.out *.pdf *.snm *.toc *.vrb *.ps *.dvi *.bbl *.blg
	-rm *~